repo: Fix build on 32-bit systems
authorKrzesimir Nowak <krzesimir@kinvolk.io>
Thu, 9 Jun 2016 10:42:28 +0000 (12:42 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 9 Jun 2016 11:25:29 +0000 (11:25 +0000)
On 32-bit systems the modifier for printing 64bit values should be
%llu instead of %lu. Just use appriopriate macros that do the right
thing.

Closes: #329
Approved by: giuseppe

src/libostree/ostree-repo.c

index 0d7ba1166a32e33391e99fbf3c59b3af85dad2ed..22b874b31780417b671489ee4527bb35dbd7625c 100644 (file)
@@ -4187,16 +4187,16 @@ _formatted_time_remaining_from_seconds (guint64 seconds_remaining)
   GString *description = g_string_new (NULL);
 
   if (days_remaining)
-    g_string_append_printf (description, "%lu days ", days_remaining);
+    g_string_append_printf (description, "%" G_GUINT64_FORMAT " days ", days_remaining);
 
   if (hours_remaining)
-    g_string_append_printf (description, "%lu hours ", hours_remaining % 24);
+    g_string_append_printf (description, "%" G_GUINT64_FORMAT " hours ", hours_remaining % 24);
 
   if (minutes_remaining)
-    g_string_append_printf (description, "%lu minutes ", minutes_remaining % 60);
+    g_string_append_printf (description, "%" G_GUINT64_FORMAT " minutes ", minutes_remaining % 60);
 
   if (seconds_remaining)
-    g_string_append_printf (description, "%lu seconds ", seconds_remaining % 60);
+    g_string_append_printf (description, "%" G_GUINT64_FORMAT " seconds ", seconds_remaining % 60);
 
   return g_string_free (description, FALSE);
 }